package com.sun.common.core.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class ImportDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    public ImportDTO() {
        this.successCount = 0;
        this.failCount = 0;
        this.repeatCount = 0;
    }

    /**
     * 成功数
     */
    @ApiModelProperty(value = "成功数", name = "successCount", example = "0")
    private Integer successCount;
    /**
     * 失败数
     */
    @ApiModelProperty(value = "失败数", name = "failCount", example = "0")
    private Integer failCount;
    /**
     * 重复数
     */
    @ApiModelProperty(value = "重复数", name = "repeatCount", example = "0")
    private Integer repeatCount;
    /**
     * 导入结果sign
     */
    @ApiModelProperty(value = "导入结果sign,用于下载", name = "importToken", example = "abc")
    private String importSign;



    /**
     * 成功条数自增
     */
    public void saveCountGetAndIncrement() {
        this.successCount++;
    }

    /**
     * 失败条数自增
     */
    public void failCountGetAndIncrement() {
        this.failCount++;
    }

    /**
     * 重复条数自增
     */
    public void repeatCountGetAndIncrement() {
        this.repeatCount++;
    }
}
